<?php use_helper("i18n")?>
<?php $culture = $sf_user->getCulture()?>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBp4Lmo-IZ8NzYECB3F-rwYAAzx9YVo_HA&sensor=false"></script>
<script type="text/javascript">
	function initialize() {
		var myOptions = {
			//center: new google.maps.LatLng(13.804087, 100.710279 ),
			center: new google.maps.LatLng( <?php echo $earthQuake->getIlatitudeDegree()?>.<?php echo $earthQuake->getIlatitudeMinute()?><?php echo $earthQuake->getIlatitudeSecond()?>, <?php echo $earthQuake->getIlongitudeDegree()?>.<?php echo $earthQuake->getIlongitudeMinute()?><?php echo $earthQuake->getIlongitudeSecond()?> ),
			zoom: 5,
			mapTypeId: google.maps.MapTypeId.ROADMAP
		};
		var map = new google.maps.Map(document.getElementById("earthquake-map"),
		myOptions);

		var image = '/images/ico-star.png';
		var myLatLng = new google.maps.LatLng( <?php echo $earthQuake->getIlatitudeDegree()?>.<?php echo $earthQuake->getIlatitudeMinute()?><?php echo $earthQuake->getIlatitudeSecond()?>, <?php echo $earthQuake->getIlongitudeDegree()?>.<?php echo $earthQuake->getIlongitudeMinute()?><?php echo $earthQuake->getIlongitudeSecond()?> );
		var beachMarker = new google.maps.Marker({
			position: myLatLng,
			map: map,
			icon: image
		});
	}
</script>
<!-- header -->
<div id="header" class="inner-short">
<!-- container -->
<div id="container">
<div id="col-left">
<div id="left-nav-2">
<div class="h-left-menu"><span>เตือนภัย !</span></div>
<div class="verticalNav noJS jAccordion-keepLinksEnabled">
  <ul class="jAccordion-slidesWrapper">
    <li class="jAccordion-slide"><a href="#">ประกาศกรมอุตุวิทยา</a></li>
    <li class="jAccordion-slide"><a href="#">เส้นทางเดินพายุ</a></li>
    <li class="jAccordion-slide"><a href="#" class="nav-select"><?php echo __("Earthquake Report")#รายงานแผ่นดินไหว?></a></li>
  </ul>
</div>
</div>
<div class="clear" style="height:10px;"></div>
<div class="line-red-s"></div>
<div class="clear" style="height:2px;"></div>
<div class="left-banner"><a href="http://www.seismology.tmd.go.th/inside.php"><img src="<?php echo image_path( "/images/banner-9.jpg" )?>" width="230" height="73"><div class="txt-banner-red-s"><img src="<?php echo image_path( "/images/ico-banner-red-s.png" )?>" width="11" height="11">สำนักเฝ้าระวังแผ่นดินไหว</div></a></div>
<div class="clear" style="height:10px;"></div>
<div class="left-banner"><a href="http://www.seismology.tmd.go.th/inform.html"><img src="<?php echo image_path( "/images/banner-10.jpg" )?>" width="230" height="73"><div class="txt-banner-red-s"><img src="<?php echo image_path( "/images/ico-banner-red-s.png" )?>" width="11" height="11">แจ้งเหตุรู้สึกสั่นไหว</div></a></div>
<div class="clear" style="height:2px;"></div>
<div class="line-red-s"></div>
</div>
<div id="col-right">
<div class="header-txt"><?php echo __("Earthquake Report")#รายงานแผ่นดินไหว?></div>
<div id="earthquake-map"></div>
<div class="h-txt-black-b"><?php echo $earthQuake->getStitleTh()?></div>
<ul class="earthquake-detail">
<li><div class="h-inner-tab-b"><?php echo __("Richter Magnitude") #ขนาด?></div><div class="blue-tab-txt">: <?php echo $earthQuake->getNmagnitude()?></div></li>
<li><div class="h-inner-tab-b"><?php echo __("Region") #จุดศูนย์กลางแผ่นดินไหว?></div><div class="blue-tab-txt">: <?php echo $earthQuake->getSoriginTh()?></div></li>
<li><div class="h-inner-tab-b"><?php echo __("Date") #วันที่?></div><div class="blue-tab-txt">: <?php echo TMDService::toThaiFullDatetime( $earthQuake->getDttime() )?> <?php echo __("UTC") #น.?></div></li>
<li><div class="h-inner-tab-b"><?php echo __("Latitude") #ละติจูด?></div><div class="blue-tab-txt">: <?php echo $earthQuake->getIlatitudeDegree()?> <?php echo $earthQuake->getIlatitudeMinute()?>' <?php echo $earthQuake->getIlatitudeSecond()?>'' <?php echo __("S")#เหนือ?></div></li>
<li><div class="h-inner-tab-b"><?php echo __("Longitude") #ลองจิจูด?> </div><div class="blue-tab-txt">: <?php echo $earthQuake->getIlongitudeDegree()?> <?php echo $earthQuake->getIlongitudeMinute()?>' <?php echo $earthQuake->getIlongitudeSecond()?>'' <?php echo __("E")#ตะวันออก?></div></li>
<li><div class="h-inner-tab-b"><?php echo __("Depth") #ความลึกจากระดับผิวดิน?></div><div class="blue-tab-txt">: <?php echo $earthQuake->getIdeepUnderground()?> <?php echo __("km.") #กิโลเมตร?></div></li>
</ul>
<div class="bar-blue">
<div class="h-txt-white-earth"><?php echo __("Last 15 day") #รายงานแผ่นดินไหวในรอบ 15 วัน?></div>
<form method="post" action="" name="frm" id="frm">
<div class="bar-blue-txt-w">เลือกวันที่</div>
<div class="txt-box">
<input type="text" class="txtbox" name="dateStart" id="dateStart" value="" />
</div>
<div class="bar-blue-txt-w">ถึง</div>
<div class="txt-box">
<input type="text" class="txtbox" name="dateEnd" id="dateEnd" value="" />
</div>
<div class="search-bar-blue-earthquake"><input type="submit" class="sendq" value="ค้นหา"></div>
</form>
</div>
<div class="main-box">
<div class="border-table">
<table width="100%" cellpadding="0" cellspacing="0">
<thead>
    <tr>
        <th style="width:100px;"><?php echo __("Date")#วันที่?></th>
        <th><?php echo __("Time")?></th>
        <th style="width:160px;"><?php echo __("Center")?></th>
        <th style="width:100px;"><?php echo __("Latitude") #ละติจูด?></th>
        <th style="width:100px;"><?php echo __("Longitude") #ลองจิจูด?></th>
        <th><?php echo __("Magnitude")#ขนาด?></th>
        <th><?php echo __("Depth")#ลึกจาก<br/>พื้นดิน?></th>
    </tr>
</thead>
<tbody>
<?php foreach( $earthQuakes as $eq ):?>
    <tr>
        <td><?php echo TMDService::toThaiDate( $eq->getDttime() )?></td>
        <td><?php echo TMDService::toThaiTime( $eq->getDttime() )?></td>
        <td style="text-align:left;"><?php echo $eq->getSoriginTh()?></td>
        <td><?php echo $eq->getIlatitudeDegree()?> <?php echo $eq->getIlatitudeMinute()?>' <?php echo $eq->getIlatitudeSecond()?>'' N</td>
        <td><?php echo $eq->getIlongitudeDegree()?> <?php echo $eq->getIlongitudeMinute()?>' <?php echo $eq->getIlongitudeSecond()?>'' E</td>
        <td><?php echo $eq->getNmagnitude()?></td>
        <td><?php echo $eq->getIdeepUnderground()?></td>
    </tr>
<?php endforeach;?>
</table>
</div>
<div class="load-more"><input type="button" class="load" value="ดูเพิ่มเติม"></div>
</div>
</div>
</div>
<!-- container -->